<?php
/*
 * Created on 2012-7-14
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 class article extends MY_Controller{
 	function __construct(){
 		parent::__construct();
 	}
 	function index($id,$fid=''){
 		$this->load->model('articles_m');
 		$article = $this->articles_m->get_article_by_id($id)->result();
 		$this->load->model('comment_m');
		$comments = $this->comment_m->get_comments_by_articleid(array('article_id'=>$id));
 		$data['articles'] = $article;
 		$data['comments'] = $comments->result();
 		$data['comments_num'] = $comments->num_rows();
		$this->load_theam_view('article',$data);
 	}
 }
?>
